﻿// -------------------------------------------------------------------------
//    @FileName         :    NFLogicConfig.cpp
//    @Author           :    gaoyi
//    @Date             :    24-8-15
//    @Email            :    445267987@qq.com
//    @Module           :    NFLogicConfig
//
// -------------------------------------------------------------------------

#include "NFLogicConfig.h"

#include <NFComm/NFPluginModule/NFIConfigModule.h>

NFLogicConfig::NFLogicConfig()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFLogicConfig::~NFLogicConfig()
{
}

int NFLogicConfig::CreateInit()
{
    m_pServerConfig = FindModule<NFIConfigModule>()->GetAppConfig(NF_ST_LOGIC_SERVER);
    m_config.m_bPkgRateCheck = true;
    m_config.m_dwSessionHeartbeatTimeOut = 300;
    return 0;
}

int NFLogicConfig::ResumeInit()
{
    m_pServerConfig = FindModule<NFIConfigModule>()->GetAppConfig(NF_ST_LOGIC_SERVER);
    return 0;
}